-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decrypt statements #348
Merged
Merged
Decrypt statements #348
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add these as a separate variant from private key encryptions, since they are created and bounded differently. Since we bound the error term by half the ciphertext modulus, this commit also changes the bounds to be specified by number of bits.
For polynomials with zero coefficients exceeding degree bound
Taking Self was weird. Call sites don't need to be updated as calling associated `Log2::method(x)` is still valid, just a weird thing to enforce.
This would previously give very large norms values for small negative values close to the negative cutoff
Silly mistake but easy to miss: we were storing the message to repeat as a _freshly encoded_ plaintext. The values match, but not the underlying messages! Fix to use the actual plaintext coming out of the decryption, which is not a fresh encoding.
As implemented, this would have almost never been used correctly. The user would have had to ensure that the existing plaintext message had the same plaintext polynomial encoding as the provided ciphertext. This would generally only be true if both were fresh encryptions, in which case this method is not even necessary.
But keep the AS=T debug assertion
Also use u32 over u64, as std::lib does for various "bit length" operations like Shl, log2, et.
samtay
force-pushed
the
samtay/hack-decrypt-statements
branch
from
February 20, 2024 19:02
e306358
to
fd70d9b
Compare
ryanorendorff
approved these changes
Feb 20, 2024
And fail fast if calculating the modulus overflows
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support "decryption statements", i.e. statements about ciphertexts that aren't fresh encryptions. These have the same format as symmetric statements in logproof, but the bounds are much more lax as errors can go up to$\Delta/2$ rather than being a fresh noise polynomial.